/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.jsysacc.asistencia.model.logic.maestros;

import com.jsysacc.asistencia.model.beans.maestros.Cargo;
import com.jsysacc.asistencia.model.dao.design.maestros.ICargoDAO;
import com.jsysacc.asistencia.model.dao.factory.MainDAOFactory;
import java.util.ArrayList;

/**
 *
 * @author Carlos
 */
public class CargoLogic {

    ICargoDAO cargoDAO = MainDAOFactory.getInstance().getCargoDAO();

    public CargoLogic() {
    }

    public ArrayList<Cargo> getAll() throws Exception {
        return cargoDAO.getAll();
    }

    public ArrayList<Cargo> getByCriterio(String criterio, String valor) throws Exception {
        return cargoDAO.getByCriterio(criterio, valor);
    }

    public Cargo getByPk(String pk) throws Exception {
        return cargoDAO.getByPk(pk);
    }

    public boolean delete(String pk) throws Exception {
        return cargoDAO.delete(pk);
    }

    public boolean insert(Cargo entity) throws Exception {
        return cargoDAO.insert(entity);
    }

    public boolean update(Cargo entity) throws Exception {
        return cargoDAO.update(entity);
    }

}
